home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 2 / CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso / magazine / amiga_e / amigae.jan.archive / 000056_crash!plucky.i…b.af.mil!bwills_Mon, 24 Jan 94 00:48:35 PST.msg < prev    next >
Text File  |  1994-02-17  |  4KB  |  95 lines

  1. Received: by bkhouse.cts.com (V1.17-beta/Amiga)
  2.       id <1n4w@bkhouse.cts.com>; Mon, 24 Jan 94 00:48:35 PST
  3. Received: from kirk.safb.af.mil by crash.cts.com with smtp
  4.     (Smail3.1.28.1 #18) id m0pO7d9-0000JiC; Sun, 23 Jan 94 08:25 PST
  5. Received: from ike (ike [140.175.6.44]) by kirk.safb.af.mil (8.6.4/8.6.4) with SMTP id KAA04939 for <amigae@bkhouse.cts.com>; Sun, 23 Jan 1994 10:25:00 -0600
  6. Received: from plucky.safb.af.mil by ike (4.1/SMI-4.1)
  7.     id AA11342; Sun, 23 Jan 94 10:21:21 CST
  8. Received: by plucky.safb.af.mil (4.1/SMI-4.1)
  9.     id AA00823; Sun, 23 Jan 94 10:22:58 CST
  10. Date: Sun, 23 Jan 94 10:22:58 CST
  11. Message-Id: <9401231622.AA00823@plucky.safb.af.mil>
  12. From: bwills@plucky.safb.af.mil (Barry D Wills)
  13. To: 
  14. Subject: re: lvlist
  15.  
  16. -> OK, I've tried this in my code....
  17. ->
  18. ->      SELECT gadgetid
  19. ->      CASE ADDLIST
  20. ->        AddTail(lvlist,[0,0,0,0,'!x!']:ln)
  21. ->        Gt_SetGadgetAttrsA(clicked,win,NIL,[GTLV_LABELS,$FFFFFFFF])
  22. ->        Gt_SetGadgetAttrsA(clicked,win,NIL,[GTLV_LABELS,lvlist])
  23. ->      ENDSELECT
  24.  
  25. Aren't the AddTail() line and first Gt_Set..A() lines in
  26. reverse order?  Also, Kenny, you need to have a 0 as the
  27. last tag in your taglist:  [GTLV_LABELS,$FFFFFFFF,0] or
  28. [GTLV_LABELS,$FFFFFFFF,TAG_DONE] (TAG_DONE is from
  29. utilities/taglist.m).
  30.  
  31. -> What I want to happen is: when I click on my "Add" button, the string '!x!'
  32. -> (just for testing, don't worry!) to appear at the bottom of the list. But
  33. -> clicking on the button for the first time results in nothing, whilst
  34. -> clicking it again causes the process to hang....
  35. -> I guess LISTVIEW's aren't my thing ... :)
  36.  
  37. Also, you DON'T want to use static variables in dynamic
  38. structures, such as this listview, unless you're sure
  39. what's going on.  If that AddTail() is in any kind of
  40. a loop, or a function that's called two or more times,
  41. your setting yourself up by linking that static memory
  42. to itself.
  43.  
  44. To demonstrate what I mean, compile and run this:
  45.  
  46. PROC fun()
  47.   DEF f:PTR TO LONG
  48.   f:=[1,2,3]
  49.   WriteF('f@\d=[\d,\d,\d]\n', f, f[0], f[1], f[2])
  50. ENDPROC f
  51.  
  52. PROC main()
  53.   DEF x:PTR TO LONG
  54.   x:=fun()
  55.   x[0]:=9; x[1]:=8; x[2]:=7
  56.   fun()
  57. ENDPROC
  58.  
  59. Calling fun() puts the address of the static list
  60. containing [1,2,3] into x in main().  Then the contents
  61. of the list are changed in main() (huh!!!), so the next
  62. time you call fun() you don't see what you might expect.
  63.  
  64. This is your brain:  __________________________
  65. This is your brain on E:  !!!!!!!!!!!!!!!!!!!!!*
  66. Any questions?
  67.  
  68. -- Barry
  69. From crash!Ra.MsState.Edu!djm2 Mon, 24 Jan 94 00:48:50 PST
  70. Received: by bkhouse.cts.com (V1.17-beta/Amiga)
  71.       id <1n57@bkhouse.cts.com>; Mon, 24 Jan 94 00:48:50 PST
  72. Received: from Tut.MsState.Edu by crash.cts.com with smtp
  73.     (Smail3.1.28.1 #18) id m0pO9YI-0000cEC; Sun, 23 Jan 94 10:28 PST
  74. Received: from Ra.MsState.Edu (djm2@Ra.MsState.Edu [130.18.80.10]);
  75.            by Tut.MsState.Edu using ESMTP (8.6.4/6.5m-FWP);
  76.            id MAA10322; Sun, 23 Jan 1994 12:28:43 -0600
  77. Received: from localhost by Ra.MsState.Edu (8.6.4/6.0c-FWP);
  78.        id MAA13830; Sun, 23 Jan 1994 12:28:41 -0600
  79. Message-Id: <199401231828.MAA13830@Ra.MsState.Edu>
  80. Date: Sun, 23 Jan 1994 12:28:41 -0600 (CST)
  81. In-Reply-To: <9401221615.AA00473@plucky.safb.af.mil> from "Barry D Wills" at Jan 22, 94 10:15:15 am
  82. X-Mailer: ELM [version 2.4 PL22]
  83. MIME-Version: 1.0
  84. Content-Type: text/plain; charset=US-ASCII
  85. Content-Transfer-Encoding: 7bit
  86. Content-Length: 124
  87. From: Daniel Jr Murrell <djm2@Ra.MsState.Edu>
  88. To: AmigaE@bkhouse.cts.com
  89. Subject: Re: UnsubscribEEs
  90.  
  91. Barry,
  92.   How do I get off this list!? :)  I've tried several times, but the 
  93. listserver just will not take me off. :(
  94.  
  95. Dan